package ua.kpi_java_training.tyshchenko.module2.test;

import org.junit.Before;

import static junit.framework.Assert.*;

import org.junit.Test;
import ua.kpi_java_training.tyshchenko.module2.Habitat;
import ua.kpi_java_training.tyshchenko.module2.Position;
import ua.kpi_java_training.tyshchenko.module2.StabInputAllData;
import ua.kpi_java_training.tyshchenko.module2.StabRandom;

/**
 * @author Vlad Tyshchenko
 * @version 1.0 24 June 2013
 */
public class HabitatTest {
    Habitat habitat;
    Position position;

    @Before
    public void setUp() throws Exception {
        habitat = new Habitat(new StabInputAllData());
        position = new Position(new StabRandom(), habitat);
    }

    @Test
    public void testGetWidth() throws Exception {
        assertEquals("get width habitat ", 100, habitat.getWidth());
    }

    @Test
    public void testGetLength() throws Exception {
        assertEquals("get length habitat ", 100, habitat.getWidth());
    }

    @Test
    public void testCheckAvailableSpace() throws Exception {
        assertFalse("check hurdle ", habitat.checkAvailableSpace(position));
    }
}
